package com.webcamtracker.color.segmentation;

import java.util.HashMap;
import java.util.Map;


public class TrackingObjectImpl implements TrackingObject {
    private int x;
    private int y;
    private int width;
    private int height;
    private Map<String, Object> additionalData;

    public TrackingObjectImpl(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
        additionalData = new HashMap<String, Object>();
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }

    public void addAdditionalData(String key, Object value) {
        additionalData.put(key, value);
    }

    public Object getAdditionalData(String key) {
        return additionalData.get(key);
    }
}
